#!/usr/bin/env python
"""A more advanced Reducer, using Python iterators and generators."""

import sys

def read_mapper_output(f, separator='\t'):
    for line in f:
        yield line.rstrip().split(separator, 0)

def main(separator='\t'):
    data = read_mapper_output(sys.stdin, separator=separator)
    for line in data:
        print "%s%s%d" % (line, separator,"")

if __name__ == "__main__":
    main()
